package com.lans.binary;

/**
 * @author: lans
 * @date: 2025/2/27
 * @name: 刘宇
 */
public class TestTree {
    public static void main(String[] args) {

        BinaryTree1 binaryTree1 = new BinaryTree1();

        Node root = new Node(1, "小王");
        Node node2 = new Node(2, "小李");
        Node node3 = new Node(3, "小刘");
        Node node4 = new Node(4, "小A");
        Node node5 = new Node(5, "小周");

        root.left = node2;
        root.right = node3;
        node2.left = node4;
        node2.right = node5;
        binaryTree1.root = root;
        binaryTree1.preSelect();
        System.out.println("-----=========------");
        binaryTree1.infixSelect();
        System.out.println("-----=========------");
        binaryTree1.postSelect();
        System.out.println("-------------------");
    }
}